package br.com.felix.fwt.svg.text;

import br.com.felix.fwt.svg.SVGBase;
import br.com.felix.fwt.svg.SVGBuilder;
import br.com.felix.fwt.svg.SVGColor;

public class SVGText extends SVGBase<SVGText> {

		
	private String text;
	
	private int dx[], dy[];
	
	private int []rotate;
	
	private Integer textLength;
	
	private SVGLengthAdjust lengthAdjust;
	
	private SVGColor fill;
	
	private Integer fontSize;
		
	@Override
	public void toSVG(SVGBuilder svgBuilder) {
		svgBuilder.createElement("text")
			.attribute("style",style)
			.attribute("dx", dx)
			.attribute("dy", dy)
			.attribute("rotate", rotate)
			.attribute("textLength", textLength)
			.attribute("lengthAdjust", lengthAdjust)
			.attribute("fill", fill)
			.attribute("font-size", fontSize)
			.x(x)
			.y(y)
			.body(text)
			.endElement();
	}



	public String getText() {
		return text;
	}



	public SVGText text(String text) {
		this.text = text;
		return this;
	}


	public SVGText dx(int[] dx){
		this.dx = dx;
		return this;
	}
	
	
	public SVGText dy(int[] dy){
		this.dy = dy;
		return this;
	}
	
	public SVGText rotate(int[] rotate){
		this.rotate = rotate;
		return this;
	}
	
	public SVGText lengthAdjust(SVGLengthAdjust lengthAdjust){
		this.lengthAdjust = lengthAdjust;
		return this;
	}
	
	
	public SVGText fill(SVGColor fill){
		this.fill = fill;
		return this;
	}
	
	public SVGText fontSize(int size){
		this.fontSize = size;
		return this;
	}
}
